Skip to content

[Pratt Parser] Refactor worker methods and parse unary operator chains iteratively.#2161

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test_951740031
Jul 24, 2026
Merged

[Pratt Parser] Refactor worker methods and parse unary operator chains iteratively.#2161
copybara-service[bot] merged 1 commit into
masterfrom
test_951740031

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Jul 22, 2026

Copy link
Copy Markdown

[Pratt Parser] Refactor worker methods and parse unary operator chains iteratively.

  • Extract helper methods (ParseTernary, ParseSelectorChainTail, ParseUnaryOpsChain, ParseIdentOrCall, ParseNegativeIntLiteral, ParseNegativeDoubleLiteral, BuildBinaryCall) to reduce the size of the call stack frames
  • Process prefix unary operator chains (!, -) iteratively in ParseUnaryOpsChain to reduce stack growth on deep chains.

@copybara-service
copybara-service Bot force-pushed the test_951740031 branch 2 times, most recently from 9f3a53e to b08f18a Compare July 24, 2026 21:04
@copybara-service copybara-service Bot changed the title [Pratt Parser] Optimize for recursion depth and reduce stack frame size. [Pratt Parser] Refactor worker methods and parse unary operator chains iteratively. Jul 24, 2026
…s iteratively.

- Extract helper methods (`ParseTernary`, `ParseSelectorChainTail`, `ParseUnaryOpsChain`, `ParseIdentOrCall`, `ParseNegativeIntLiteral`, `ParseNegativeDoubleLiteral`, `BuildBinaryCall`) to reduce the size of the call stack frames
- Process prefix unary operator chains (`!`, `-`) iteratively in `ParseUnaryOpsChain` to reduce stack growth on deep chains.

PiperOrigin-RevId: 953546973
@copybara-service
copybara-service Bot merged commit 155ad1e into master Jul 24, 2026
@copybara-service
copybara-service Bot deleted the test_951740031 branch July 24, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant